package com.example.server.controller;

import com.example.server.dto.OrderDto;
import com.example.server.service.DataService;
import com.example.server.vo.OrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;

@RestController
@RequestMapping("/orderList")
public class DataList {
    @Autowired
    private DataService dataService;
    @PostMapping("/orders")
    public OrderVo orders(@RequestBody OrderDto orderDto) {
        OrderVo orderVo = dataService.getOrder(orderDto);
        return orderVo;
    }
}
